<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>app view</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="style/css/bootstrap.min.css">
    <link rel="stylesheet" href="style/css/style.css">
    <script src="style/js/jquery-2.1.1.min.js"></script>
    <script src="style/js/bootstrap.min.js"></script>
</head>

<body>
    <nav class="navbar navbar-default" role="navigation">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">切换</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">
                    <i class="glyphicon glyphicon-chevron-left"></i>返回</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">wordpress</a>
                    </li>
                    <li><a href="#">drupal</a>
                    </li>
                    <li><a href="#">PHP</a>
                    </li>
                    <li><a href="#">前端</a>
                    </li>

                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-xs-12">
                <div class="post-content">
                    <div class="single-header">
                        <h1 class="title">DooPHP框架使用SQLite</h1>
                        <div class="attrs">
                            <div class="attr">
                                <i class="glyphicon glyphicon-eye-open"></i>
                                <span>23</span>
                            </div>
                            <div class="attr">
                                <i class="glyphicon glyphicon-time"></i>
                                <span>2014-10-07</span>
                            </div>
                        </div>
                    </div>

                    <div class="text">
                        <p>DooPHP框架是一个很简单的小框架，它实现了MVC、ORM、路由，并且实现的非常好用，没有其他多余的功能。</p>
                        <p>DooPHP默认是支持Mysql的，官方文档也只介绍了链接Mysql的例子，对于SQLite则只字未提。但是，它本身是实现了SQLite，只是没有说罢了。</p>
                        <p>假设是从官方包里刚解压的时候，步骤是这样子的</p>
                        <p>1、打开 /app/protected/config/db.conf.php 编辑，里面全是注释，注释说明了，连接方式是这样的</p>
                        <pre>$dbconfig[ Environment or connection name] = array(Host, Database, User, Password, DB Driver, Make Persistent Connection?);
                        </pre>
                        <p>连接Mysql的代码例子是：</p>
                        <pre>$dbconfig['dev'] = array('localhost', 'database', 'root', '1234', 'mysql', true);
                        </pre>
                        <p>连接SQLite的代码例子是：</p>
                        <pre>$dbconfig['dev'] = array($config['SITE_PATH'].'/protected/config/dblog.sqlite', '', '', '', 'sqlite', true);
                        </pre>
                        <p>注意SQLite的文件地址就行了，接下来，到 /app/index.php 取消第4、22、23行的注释。</p>
                        <p>搞定！</p>
                    </div>

                </div>
            </div>
            <!--./col-xs-12-->
        </div>
        <!--        /row-->


    </div>
    <script>
    $('.panelize-meeeee').scotchPanel({
        direction: 'left', // Will be overwritten by the Data Attributes
        duration: 150, // Will apply to both
        distanceX: '70%'
    });
    </script>
</body>

</html>
